/*
 * Created by LiuYou on 2020/11/26.
 *
 */

#include "Pc.hpp"
#include "PcImpl.hpp"

Pc::Pc(const std::shared_ptr<PcImpl>& pImpl) : pImpl(pImpl) {}

const std::shared_ptr<PcImpl>& Pc::getPImpl() const {
    return pImpl;
}

Pc::Pc(int pcId, int lifetime, const GraphicsCard& graphicsCard) : pImpl(
        std::make_shared<PcImpl>(pcId, lifetime, graphicsCard)) {
//    pImpl = std::make_shared<PcImpl>(pcId, lifetime);
//    PcImpl* pcImpl = new PcImpl::PcImpl(100, 4);

}

int Pc::getPcId() const {
//    return 0;
    return pImpl->getPcId();
}

int Pc::getLifeTime() const {
//    return 0;
    return pImpl->getLifeTime();
}

const GraphicsCard& Pc::getGraphicsCard() const {
    return pImpl->getGraphicsCard();
}













